package day_2022_4_to_7.day48;

import java.util.ArrayList;
import java.util.Scanner;

/**
 * 分解因子
 * @author haomin
 * @date 2022/05/30 17:09
 **/
public class Day31_2_DecompositionFactor {
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        while(in.hasNext()){
            int numE = in.nextInt();
            int num = numE;
            // 创建一个数组存储因子
            ArrayList<Integer> list = new ArrayList<>();
            for (int i = 2; i <= num; i++) {
                if(num % i == 0){
                    while (num % i == 0){
                        list.add(i);
                        num /= i;
                    }
                }
            }

            // 将因子添加为String类型
            String str = "";
            for (int i = 0; i < list.size(); i++) {
                if(i != list.size()-1){
                    str += list.get(i);
                    str += " * ";
                }else {
                    str +=list.get(i);
                }
            }
            System.out.println(numE +" = "+str);
        }
    }
}